home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
CHASSIS_
/
WHICHWIN.C
< prev
next >
Wrap
Text File
|
1992-05-14
|
931b
|
23 lines
/************************************************************************************/
/* WhichWindow */
/* This routine matches a WindowPtr with an entry in the window table windTbl, */
/* returning the subscript of the entry. Return code is one if a match is not */
/* found and zero if a match is found. */
/************************************************************************************/
#include "MyHeaders.h"
int WhichWindow(WindowPtr WhichWindPtr, int * WhichSubscript)
{
int WhichWindRetCode = 1; /* default return code is bad */
for (j=0; j<windMax; j++) /* check the table for.. */
if (WhichWindPtr == windTbl[j].windPtr) /* ..a match with pointer */
{ /* if there is a hit.. */
*WhichSubscript = j;
WhichWindRetCode = 0; /* set return code to good */
break; /* get out of the loop */
}
return WhichWindRetCode;
}